package com.school.demo.model.auto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.github.dreamyoung.mprelation.JoinColumn;
import com.github.dreamyoung.mprelation.ManyToOne;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 *
 * </p>
 *
 * @author Charlotte
 * @since 2021-04-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class StudentReport extends Model {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 点赞量
     */
    private Integer clickNum;

    private Integer uId;

    private String publishTime;

    private String content;

    /**
     * 图片列表集合
     */
    private String imgList;

    /**
     * 校园动态的数据类型
     */
    private Integer type;

    /**
     * 浏览量，当用户加载到该条数据，自动判断该用户是否加载过该条数据（省略不写。加载就直接加1）
     */
    private Integer viewNum;


    @TableField(exist = false)
    @ManyToOne
    @JoinColumn(name="u_id",referencedColumnName = "id")
    private Student student;

}
